#ifndef SEARCHDB_H
#define SEARCHDB_H

#include <QtGui/QWidget>
#include <QShortcut>
#include "ui_SearchDB.h"

#include <iostream>

#include "WordManager.h"
#include "DictManager.h"
#include "Logger.h"
#include "Word.h"
#include "Options.h"

using namespace std;

class SearchDB : public QWidget
{
    Q_OBJECT

public:
    SearchDB(QWidget *parent = 0);
    ~SearchDB();

    void setSearchWord(QString key){ui.wordLineEdit->setText(key);}

    void showSearchBar();
    void hideSearchBar();
    void showBasicInfo();
    void showHistoryInfo();
    void showCustomListInfo();

public slots:
	void show();
    void search();
    void updateCustomListInfo();
    //void hide();

private:
	QWidget* mParent;
    Ui::SearchDBClass ui;
    int mSearchWordID;
    QString mSearchWord;
    Word* mCurWord;

    //QShortcut* mSearchShortcut;
};

#endif // SEARCHDB_H
